variable "engine" {
  type = string
  default = "MySQL"
}

variable "engine_version" {
  type = string
  default = "8.0"
}

variable "multi_zone" {
  type = bool
  default = true
}

variable "zone_id" {
  type = string
  default = ""
}

variable "zone_id_slave_a" {
  type = string
  default = ""
}

variable "zone_id_slave_b" {
  type = string
  default = ""
}

variable "exist_azs" {
  type = list(string)
  default = []
}

variable "exist_vswitch_ids" {
  type = list(string)
  default = []
}

variable "vswitch_id" {
  type = string
  description = "The virtual switch ID to launch DB instances in one VPC."
  default     = ""
}

// instance
variable "instance_name" {
  type = string
  default = ""
}

variable "instance_type" {
  type = string
  default = "rds.mysql.t1.small"
}

variable "instance_storage" {
  type = number
  default = 20
}

variable "instance_storage_type" {
  type = string
  default = "local_ssd"
}

variable "security_ips" {
  type    = list(string)
  default = ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
}

// config
variable "parameters" {
  description = "Rds parameters"
  type = list(map(string))
  default = [
    {
      name = "sql_mode"
      value = ""
    },
    {
      name = "explicit_defaults_for_timestamp"
      value = "ON"
    }
  ]
}

variable "databases" {
  description = "A list mapping used to add multiple databases. Each item supports keys: name, character_set and description. It should be set when create_database = true."
  type        = list(map(string))
  default     = []
}

variable "accounts" {
  //  type = list(map(string))
  default = []
}

// Other
variable "allocate_public_connection" {
  type = bool
  default = false
}

variable "tags" {
  type        = map(string)
  default     = {}
}